package com.hehui.module.goods.dao;



import com.hehui.module.goods.entity.BaseUnit;
import com.hehui.module.goods.entity.BaseUnitExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品单位，mapper
 */
public interface BaseUnitMapper {
    long countByExample(BaseUnitExample example);

    int deleteByExample(BaseUnitExample example);

    int deleteByPrimaryKey(Long buUnitid);

    int insert(BaseUnit record);

    int insertSelective(BaseUnit record);

    List<BaseUnit> selectByExample(BaseUnitExample example);

    BaseUnit selectByPrimaryKey(Long buUnitid);

    int updateByExampleSelective(@Param("record") BaseUnit record, @Param("example") BaseUnitExample example);

    int updateByExample(@Param("record") BaseUnit record, @Param("example") BaseUnitExample example);

    int updateByPrimaryKeySelective(BaseUnit record);

    int updateByPrimaryKey(BaseUnit record);
    // 根据商品单位名字模糊查询 （is_del 字段默认为1）
    List<BaseUnit> findBaseUnitByNameLike(@Param("unitName") String unitName,@Param("merchantId") Long merchantId);
}